package com.handsome.建造者模式.建造者实现方式;

/**
 * 指挥者
 * @author niechun
 * @date 2023/2/1 19:57
 */
public class HouseDirecter {
    private HouseBuilder houseBuilder;

    public HouseDirecter(HouseBuilder houseBuilder) {
        this.houseBuilder = houseBuilder;
    }

    public HouseDirecter() {
    }

    public House buildHouse(){
        houseBuilder.buildBasic();
        houseBuilder.buildWall();
        houseBuilder.buildRoof();
        return houseBuilder.getHouse();
    }
}
